package server

import (
	"github.com/gin-gonic/gin"
)

func Router(r *gin.Engine) *gin.Engine {
	// 算力概览
	overViewGroup := r.Group("/api/v1/monitor/overview")
	overViewGroup.GET("/", nil)
	overViewGroup.GET("/idc", nil)
	overViewGroup.GET("/gpu_top5", nil)
	overViewGroup.GET("/trend", nil)
	overViewGroup.GET("/supplier", nil)
	overViewGroup.GET("/gpu_rental_rate", nil)
	overViewGroup.GET("/gpu/top_models", nil)
	overViewGroup.GET("/gpu/statistics", nil)
	overViewGroup.GET("/gpu/model_distribution_trend", nil)
	overViewGroup.GET("/gpu/top_models", nil)

	// 算力运营
	operationGroup := r.Group("/api/v1/monitor/operation")
	operationGroup.GET("/user_trend", nil)
	operationGroup.GET("/order_trend", nil)
	operationGroup.GET("/rented_gpu_trend", nil)
	operationGroup.GET("/top5_gpu_rentals", nil)
	operationGroup.GET("/top5_idle_gpu", nil)
	operationGroup.GET("/gpu_distribution", nil)
	operationGroup.GET("/gpu_geographical_distribution", nil)
	operationGroup.GET("/supplier_statistics", nil)

	// 资源管理
	resourceGroup := r.Group("/api/v1/monitor/manager")
	resourceGroup.GET("/resources", nil)
	resourceGroup.GET("/events", nil)
	resourceGroup.GET("/idc_clusters", nil)
	resourceGroup.GET("/rack_resources", nil)
	resourceGroup.GET("/resource_utilization_trend", nil)
	resourceGroup.GET("/storage_utilization_trend", nil)

	// 集群详情
	clusterGroup := r.Group("/api/v1/monitor")
	clusterGroup.GET("/{idc_Name}/{cluster}/top_10_cpu_usage_pods", nil)
	clusterGroup.GET("/{idc_Name}/{cluster}/top_10_memory_usage_pod", nil)
	clusterGroup.GET("/{idc_name}/{cluster}/node_analysis", nil)
	clusterGroup.GET("/{idc_name}/{cluster}/partition_usage_top5", nil)
	clusterGroup.GET("/{idc_name}/{cluster}/workloads", nil)
	clusterGroup.GET("/{idc_name}/{cluster}/resource_allocation_rate", nil)
	clusterGroup.GET("/{idc_name}/{cluster}/network_traffic_trend", nil)
	clusterGroup.GET("/{idc_name}/{cluster}/k8s_master_analysis", nil)

	return r
}
